<template>
  <el-button :type="type" circle size="small" @click="handleClick">
  </el-button>
</template>

<script>
/* eslint-disable eqeqeq */

export default {
  name: 'Status',
  props: ['status'],
  created() {
    if (this.status == '0') {
      this.type = 'success';
    } else if (this.status == '1') {
      this.type = 'danger';
    } else if (this.status == '2') {
      this.type = 'warning';
    } else if (this.status == '3') {
      this.type = 'info';
    }
  },
  data() {
    return {
      type: '',
    };
  },
  methods: {
    handleClick() {
      console.log('click');
      this.$emit('check');
    },
  },
};
</script>

<style scoped>

</style>
